import AppEnvironments from '@/services/AppEnvironment';
import {useUpload as BaseUpload} from 'tsun-smart-ui';
import {useMMKVString} from './useMMkv';
export const useUpload = () => {
  const [token] = useMMKVString('auth_token');  
  return BaseUpload<{
    data: {
      originPath: string;
    };
  }>({
    apiUrl: AppEnvironments.current.baseURL + 'admin/sys-file/upload',
    headers: {
      authorization: `Bearer ${token}`,
    },
  });
};
